SpatialStream® Code Examples

Color Change

This example shows how the color of the parcel lines can be modified when using the Parcel Tile layer.
To change the default color of the lines, add the "color" parameter and define your desired parcel line color.
In the sample, the color is changed using a color picker box.

GetMap

layer = new Dmp.Layer.TileLayer("SS", "samplesite.dmp/ParcelTiles", {
minZoom:16,maxZoom:19
});
map.overlayMapTypes.push(new google.maps.ImageMapType(layer));

//----------------

function setColor(color) {

color = RGBtoHex(color);
color = color.replace("#", "");

layer = new Dmp.Layer.TileLayer("SS", "samplesite.dmp/ParcelTiles", {
minZoom:16,maxZoom:19,color:color
});
if(document.getElementById('ParcelToggle').checked == true) {

map.overlayMapTypes.pop();
map.overlayMapTypes.push(new google.maps.ImageMapType(layer));
}
}


Run Sample   Back To Index